<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Miniappsauditrestults extends Model
{
    protected $table = 'miniapps_audit_restults';
    protected $primaryKey = 'id';

    public static function insertAuditRestults($original_id,$status,$reason,$screenshot,$created_at)
    {
        return self::insert(["original_id"=>$original_id,"status"=>$status,"reason"=>$reason,"screenshot"=>$screenshot,"preauthcode"=>$preauthcode,"created_at"=>$created_at]);
    }

    public static function getMiniappsAuditRestults($original_id)
    {
        return self::where("original_id",$original_id)->paginate(25);
    }
}